diff --git a/include/test/ut.h b/include/test/ut.h
index 6ab2f88..3295cd4 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -58,6 +58,31 @@
 			__attribute__ ((format (__printf__, 2, 3)));
 
 /**
+ * ut_check_console_linen() - Check part of the next console line
+ *
+ * This creates a string and then checks it against the next line of console
+ * output obtained with console_record_readline(). Only the length of the
+ * string is checked
+ *
+ * After the function returns, uts->expect_str holds the expected string and
+ * uts->actual_str holds the actual string read from the console.
+ *
+ * @uts: Test state
+ * @fmt: printf() format string for the error, followed by args
+ * @return 0 if OK, other value on error
+ */
+int ut_check_console_linen(struct unit_test_state *uts, const char *fmt, ...)
+			__attribute__ ((format (__printf__, 2, 3)));
+
+/**
+ * ut_check_skipline() - Check that the next console line exists and skip it
+ *
+ * @uts: Test state
+ * @return 0 if OK, other value on error
+ */
+int ut_check_skipline(struct unit_test_state *uts);
+
+/**
  * ut_check_console_end() - Check there is no more console output
  *
  * After the function returns, uts->actual_str holds the actual string read
@@ -152,6 +177,23 @@
 	}								\
 }
 
+/*
+ * Assert that two string expressions are equal, up to length of the
+ * first
+ */
+#define ut_asserteq_strn(expr1, expr2) {				\
+	const char *_val1 = (expr1), *_val2 = (expr2);			\
+	int _len = strlen(_val1);					\
+									\
+	if (memcmp(_val1, _val2, _len)) {				\
+		ut_failf(uts, __FILE__, __LINE__, __func__,		\
+			 #expr1 " = " #expr2,				\
+			 "Expected \"%.*s\", got \"%.*s\"",		\
+			 _len, _val1, _len, _val2);			\
+		return CMD_RET_FAILURE;					\
+	}								\
+}
+
 /* Assert that two memory areas are equal */
 #define ut_asserteq_mem(expr1, expr2, len) {				\
 	const u8 *_val1 = (u8 *)(expr1), *_val2 = (u8 *)(expr2);	\
@@ -231,6 +273,23 @@
 		return CMD_RET_FAILURE;					\
 	}								\
 
+/* Assert that the next console output line matches up to the length */
+#define ut_assert_nextlinen(fmt, args...)				\
+	if (ut_check_console_linen(uts, fmt, ##args)) {			\
+		ut_failf(uts, __FILE__, __LINE__, __func__,		\
+			 "console", "\nExpected '%s',\n     got '%s'",	\
+			 uts->expect_str, uts->actual_str);		\
+		return CMD_RET_FAILURE;					\
+	}								\
+
+/* Assert that there is a 'next' console output line, and skip it */
+#define ut_assert_skipline()						\
+	if (ut_check_skipline(uts)) {					\
+		ut_failf(uts, __FILE__, __LINE__, __func__,		\
+			 "console", "\nExpected a line, got end");	\
+		return CMD_RET_FAILURE;					\
+	}								\
+
 /* Assert that there is no more console output */
 #define ut_assert_console_end()						\
 	if (ut_check_console_end(uts)) {				\
diff --git a/test/ut.c b/test/ut.c
index c64f0b5..95bdd66 100644
--- a/test/ut.c
+++ b/test/ut.c
@@ -59,6 +59,28 @@
 	return strcmp(uts->expect_str, uts->actual_str);
 }
 
+int ut_check_console_linen(struct unit_test_state *uts, const char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	vsnprintf(uts->expect_str, sizeof(uts->expect_str), fmt, args);
+	va_end(args);
+	console_record_readline(uts->actual_str, sizeof(uts->actual_str));
+
+	return strncmp(uts->expect_str, uts->actual_str,
+		       strlen(uts->expect_str));
+}
+
+int ut_check_skipline(struct unit_test_state *uts)
+{
+	if (!console_record_avail())
+		return -ENFILE;
+	console_record_readline(uts->actual_str, sizeof(uts->actual_str));
+
+	return 0;
+}
+
 int ut_check_console_end(struct unit_test_state *uts)
 {
 	if (!console_record_avail())
